﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Microsoft.HomeServer.Controls;
using Serviio.API;

namespace Serviio.WHS
{
    public partial class StoppedTabControl : UserControl
    {
        private static readonly LogFacade log = LogFacade.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        public StoppedTabControl()
        {
            InitializeComponent();
        }

        private ServiioConnection conn = null;

        public void Initialize(ServiioConnection connection)
        {
            log.Info("Initializing...");

            conn = connection;
        }

        private void buttonSetServiceStartupAccount_Click(object sender, EventArgs e)
        {
            try
            {
                ChangeServiceAccountForm dialog = new ChangeServiceAccountForm();
                dialog.ChangeServiceLogin(conn);
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }
        }

    }
}
